package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;

@FeignClient(value = "service-cart")
public interface CartInfoFeignClient {
    //加入购物车
    @PostMapping("/api/cart/addToCart/{skuId}/{skuNum}")
    Result addToCart(@PathVariable Long skuId, @PathVariable Integer skuNum);

    //查询购物车
    @GetMapping("/api/cart/toCart/{sId}")
    CartInfo toCart(@PathVariable Long sId);

    //商品清单
    @GetMapping("/api/cart/getCartInfoListByChecked")
    List<CartInfo> getCartInfoListByChecked();

}
